<%include pub/admin_head.html%>
    </head>
    <body>
        <!-- Page Container -->
        <div class="page-container">
            <%include pub/admin_nav.html%>
            <!-- Page Content -->
            <div class="page-content">
            	<%include pub/admin_top.html%>
                <div class="page-inner">
                	<div class="page-title">
                        <h3 class="breadcrumb-header">视频课件列表</h3>
                    </div>
                    <div id="main-wrapper">
                        <div class="col-md-12">
                        	<a href="/admin/lesson/upload/new" class="btn btn-success" >+ 上传新视频</a>
                            <table class="table" style="margin-top: 10px;">
                                <thead>
                                    <tr>
                                        <th>序号</th>
                                        <th>标题</th>
                                        <th>封面缩略图</th>
                                        <th>简介</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <%if(lessons){%>
                                        <%for(let i=0; i< lessons.length;i++){%>
                                        <tr>
                                            <th scope="row"><%= i+1 %></th>
                                            <td><%= lessons[i].title %></td>
                                            <td><img src="/img/videocover/<%= lessons[i].covers %>" width="100px"></td>
                                            <td><%= lessons[i].abstract %></td>
                                            <td>
                                                <a href="/admin/lesson/upload/<%= lessons[i]._id %>" class="btn btn-primary">修改</a>
                                                <button type="button" class="btn btn-danger del-video-btn" data-id="<%- lessons[i]._id %>" covers="<%- lessons[i].covers %>">删除</button>
                                            </td>
                                        </tr>
                                    <%}}%>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- Javascripts -->
        <%include pub/admin_foot.html%>
    </body>
</html>